package moon.core.classdef;

import moon.core.Name;

/** 
 * Properties of a class. Marker interface.
 * 
 * @see moon.core.classdef.ClassDef
 */
public interface Property {
	
	/**
	 * Gets the unique name.
	 * 
	 * @return unique name
	 */
	Name getUniqueName();
	
	/**
	 * Gets the name.
	 * 
	 * @return unique name
	 */
	Name getName();
	
	/**
	 * Gets the class def.
	 * 
	 * @return class
	 */
	ClassDef getClassDef();
	
	/**
	 * Queries if two properties are equivalent. 
	 * 
	 * @param property  property
	 * @return true if both properties are equivalent, false in other case
	 */
	boolean isEquiv(Property property);
	
	/**
	 * Queries if it is an intrinsic property. A property is intrinsic if it is defined
	 * in the class and it has not been defined previously in any ancestor. There are
	 * not any inheritance clause (makeeffective, makedeferred, etc.) modifying the property.
	 * See [Crespo, 00] page. 136.
	 * 
	 * @return true if it is the first time it is declared
	 */
	boolean isIntrinsic();
	
	/**
	 * Queries if a property is accesible from a class. It depends on the rules
	 * of the LOO.
	 * 
	 * @param classDef class from it is trying to access the property
	 * @return true if it is accesible, false in other case
	 */
	boolean isAccesibleFrom(ClassDef classDef);
	
	
} // Property
